import request from '@/utils/requestUtil'

/**
 * 获取指定商品的评论
 */
export function getProductComment(productId) {
	return request({
		method: 'GET',
		url: `/product/comment/${productId}`
	})
}

/**
 * 添加商品评论
 */
export function addProductComment(productId, content, type='') {
	return request({
		method: 'POST',
		url: `/product/comment/add`,
		data: {
			productId: productId,
			content: content,
			type: type
		}
	})
}